home *** CD-ROM | disk | FTP | other *** search
- head 1.3;
- branch ;
- access ;
- symbols sprited:1.3.1;
- locks ; strict;
- comment @ * @;
-
-
- 1.3
- date 88.07.29.17.55.56; author ouster; state Exp;
- branches 1.3.1.1;
- next 1.2;
-
- 1.2
- date 88.07.29.17.39.34; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.06.19.14.31.29; author ouster; state Exp;
- branches ;
- next ;
-
- 1.3.1.1
- date 91.10.02.19.13.39; author kupfer; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.3
- log
- @Lint.
- @
- text
- @/*
- * gettimeofday.c --
- *
- * Procedure to map from Unix gettimeofday system call to Sprite.
- *
- * Copyright 1986 Regents of the University of California
- * All rights reserved.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: gettimeofday.c,v 1.2 88/07/29 17:39:34 ouster Exp $ SPRITE (Berkeley)";
- #endif not lint
-
- #include "sprite.h"
-
- #include "compatInt.h"
- #include <sys/time.h>
- #include <spriteTime.h>
-
-
-
- /*
- *----------------------------------------------------------------------
- *
- * gettimeofday --
- *
- * Procedure to map from Unix gettimeofday system call to
- * Sprite Sys_GetTimeOfDay.
- *
- * Results:
- * UNIX_SUCCESS - the call was successful.
- * UNIX_ERROR - the call was not successful.
- * The actual error code stored in errno.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
- int
- gettimeofday(tp, tzp)
- struct timeval *tp;
- struct timezone *tzp;
- {
- ReturnStatus status; /* result returned by Sys_GetTimeOfDay */
- int localOffset; /* offset in minutes from UTC */
- Boolean DST; /* TRUE if Daylight Savings Time is observed */
-
- status = Sys_GetTimeOfDay((Time *) tp, &localOffset, &DST);
- if (status != SUCCESS) {
- errno = Compat_MapCode(status);
- return(UNIX_ERROR);
- } else {
- if (tzp != (struct timezone *) NULL) {
- /*
- * Unix negates the local offset from UTC to make it positive
- * for locations west of the prime meridian.
- */
- tzp->tz_minuteswest = -localOffset;
- tzp->tz_dsttime = DST;
- }
- return(UNIX_SUCCESS);
- }
- }
- @
-
-
- 1.3.1.1
- log
- @Initial branch for Sprite server.
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: /sprite/src/lib/c/unixSyscall/RCS/gettimeofday.c,v 1.3 88/07/29 17:55:56 ouster Exp $ SPRITE (Berkeley)";
- @
-
-
- 1.2
- log
- @Lint.
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: gettimeofday.c,v 1.1 88/06/19 14:31:29 ouster Exp $ SPRITE (Berkeley)";
- d18 1
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: proto.c,v 1.1 86/03/04 16:46:31 douglis Exp $ SPRITE (Berkeley)";
- d49 1
- a49 1
- status = Sys_GetTimeOfDay(tp, &localOffset, &DST);
- @
-